package com.lightboat.common.core.domain.bo;


import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import com.lightboat.common.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Schema(title = "物流订单")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LogisticsOrderBo implements Serializable {

    /**
     * 系统订单ID
     */
    @SchemaProperty(name = "系统订单ID")
    @Excel(name = "系统订单ID")
    private Long sysOrderId;

    /**
     * 系统外部订单ID
     */
    @SchemaProperty(name = "系统外部订单ID")
    @Excel(name = "系统外部订单ID")
    private String sysExternalOrderId;

    /**
     * 系统物流订单ID，YS20250827000189
     */
    @SchemaProperty(name = "系统物流订单ID，YS20250827000189")
    @Excel(name = "系统物流订单ID")
    private String sysLogisticsOrderId;


    /**
     * 物流状态（0 待发货 1已签收 2拒绝签收 3已发货,4取消，5拦截中，6拦截成功）
     */
    @SchemaProperty(name = "物流状态（0 待发货 1已签收 2拒绝签收 3已发货,4取消，5拦截中，6拦截成功）")
    @Excel(name = "物流状态")
    private String logisticsStatus;

    /**
     * 物流编号
     */
    @SchemaProperty(name = "物流编号")
    @Excel(name = "物流编号")
    private String logisticsNo;

    /**
     * 包裹IDS
     */
    @SchemaProperty(name = "包裹IDS")
    @Excel(name = "包裹IDS")
    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private JSONArray packageIds;

    /**
     * 物流平台
     */
    @SchemaProperty(name = "物流平台")
    @Excel(name = "物流平台")
    private String logisticsPlatform;

    @Excel(name = "物流平台编码")
    @SchemaProperty(name = "物流平台编码")
    private String logisticsPlatformCode;

    @SchemaProperty(name = "物流编码(物流平台订单)")
    /** 物流编码(物流平台订单) */
    private String logisticsCode;

    @SchemaProperty(name = "预计揽收时间，时间戳，ms，能截取到符合条件的时间切片则返回，否则返回空集合\n" +
            "备注：以小哥实际上门时间为准")
    private Date pickupPromiseTime;

    @SchemaProperty(name = "预计送达时间，时间戳，ms，能截取到符合条件的时间切片则返回，否则返回空集合\n" +
            "备注：以实际送达时间为准")
    private Date deliveryPromiseTime;

    @SchemaProperty(name = "预估运费，单位：元；（根据产品，货品，收寄地址获取预估费用，获取到会返回，获取不到会返回入参中的freightPre，实际费用以履约为准）")
    private BigDecimal freightPre;

    @SchemaProperty(name = "扩展信息")
    private JSONObject extra;

    @SchemaProperty(name = "取消结果；（取消类型；枚举值：0 - 取消成功；1 - 拦截成功； 2 - 取消失败；3 - 拦截失败，4-拦截中，调用成功一定返回）")
    private Integer resultType;
}
